package month3.day30;

public class Jiaoche extends Car {
    private String xinghao;

    public Jiaoche(String chepai, String pingpai, double money, String xinghao) {
        super(chepai, pingpai, money);
        this.xinghao = xinghao;
    }

    @Override
    public void show(){
        System.out.println("轿车  " + getPingpai() + "-" + getXinghao() + "，车牌：" +getChepai() + "，日租金：" + getMoney() + "，" + (getZuangtai()?"当前可租":"已租出") );
    }


    @Override
    public double zujin(int day) {
        double m=this.getMoney()*day;
        if(day>150)
            m*=0.7;
        else if(day>30)
            m*=0.8;
        else if(day>7)
            m*=0.9;
        return m;
    }


    public String getXinghao() {
        return xinghao;
    }

    public void setXinghao(String xinghao) {
        this.xinghao = xinghao;
    }

}
